package com.flower.order.controller;

import com.flower.order.service.FeignServiceInterface;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * ClassName DiscoveryConsumerController
 * @Date 2020/07/23
 * @Description 服务注册发现调用者
 * @Author wuhanxiong
 */
@Controller
@RequestMapping("/discovery/")
public class DiscoveryConsumerController {

    @Autowired
    private FeignServiceInterface feignServiceInterface;

    @RequestMapping("consumer")
    @ResponseBody
    public String consumer(){
       String msg = feignServiceInterface.provid();
       return msg;
    }

    @RequestMapping("test")
    @ResponseBody
    public String test(){
        return "test";
    }
}
